import request from '../utils/request';

// 集体备课列表
export const getTeachByCondition = (data) => {
  return request.post(`/project/teach/getTeachByCondition`, { data });
};

// 添加集体备课/培训
export const addTeach = (data) => {
  return request.post(`/project/teach/addTeach`, { data });
};

// 查询集体备课或培训
export const getTeachDetails = (params) => {
  return request.get(`/project/teach/getTeachById`, { params });
};

// 申请加入集体备课
export const joinTeach = (params) => {
  return request.get(`/project/teach/joinTeach`, { params });
};

// 开始集体备课
export const startTeachById = (params) => {
  return request.post(`/project/teach/startTeachById`, { params });
};

// 查看所有集体备课人员
export const getTeachUser = (params) => {
  return request.get(`/project/teach/getTeachUser`, { params });
};

// 创建会议
export const addTeachRoom = (data) => {
  return request.post(`/project/teach/addTeachRoom`, { data });
};

// 更新集体备课
export const updateTeach = (data) => {
  return request.post(`/project/teach/updateTeach`, { data });
};

// 审核集体备课
export const approveTeachUser = (data) => {
  return request.post(`/project/teach/approveTeachUser`, { data });
};

// 结束集体备课
export const endTeachVideo = (params) => {
  return request.get(`/project/teach/endTeachVideo`, { params });
};

// 查询当前人的申请信息
export const getJoinStatus = (params) => {
  return request.get(`/project/teach/getJoinStatus`, { params });
};

// 删除集体备课用户
export const deleteTeachUser = (params) => {
  return request.get(`/project/teach/deleteTeachUserById`, { params });
};

// 获取直播信息
export const getTeachLiveAddress = (params) => {
  return request.post(`/project/teach/getTeachLiveAddress`, { params });
};
// 查询回放总结状态
export const getBackStatus = (params) => {
  return request.get(`/project/live/summary/status`, { params });
};

// 查询回放总结内容
export const getBackContent = (params) => {
  return request.get(`/project/live/summary/content`, { params });
};

// 更新集体备课(新)
export const addTeachSummary = (data) => {
  return request.post(`/project/teach/addTeachSummary`, { data });
};

// 获取教研结论文件列表(新)
export const getTeachFileList = (params) => {
  return request.get(`/project/teach/getFileList`, { params });
};

// 下载回放总结
export const downContent = (params) => {
  return request.get(`/project/live/summary/downContent`, {
    params,
    responseType: 'blob',
  });
};
